package model;
import model.base.BaseServicer;

@SuppressWarnings("serial")
public class Servicer extends BaseServicer<Servicer> {
    public static final Servicer dao = new Servicer().dao();
    

	public Servicer findFirstByName(String name){
        return this.findFirst(" SELECT ts.* FROM t_servicer ts WHERE ts.name = ?  LIMIT 1 " , name);
    }

	public boolean isRepeatName(){
		Servicer ex = Servicer.dao.findFirstByName( getName() );
		return ( null == getId() && null != ex) || (null != ex && !ex.getId().equals(getId()));
	}
	
}
